﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EF.DAL;
using EF.Model;

namespace EF.BLL
{
    public class BlogArticleService
    {
        IRepository<BlogArticle> repository;
        public BlogArticleService(IRepository<BlogArticle> repository)
        {
            this.repository = repository;
        }

        public BlogArticleService()
        {
            this.repository = new BlogArticleRepository();
        }

        public BlogArticle Create()
        {
            return repository.Create();
        }

        public BlogArticle Insert(BlogArticle entity)
        {
            return repository.Insert(entity);
        }

        public BlogArticle Update(BlogArticle entity)
        {
            return repository.Update(entity);
        }

        public void Delete(BlogArticle entity)
        {
            repository.Delete(entity);
        }
    }
}
